import { Entity, Column, PrimaryGeneratedColumn,ManyToMany, ManyToOne, JoinColumn, OneToOne , BaseEntity } from 'typeorm';
import { Video } from '../video/video.entity'
import { LikeVideoSourceEnum } from './likeVideo.enum';

@Entity('wx_like_video')
export class LikeVideo extends BaseEntity {
  @PrimaryGeneratedColumn()
  id: number;

  @Column({ name: 'video_id' })
  video_id: number;

  @Column({ name: 'wx_user' })
  wx_user: string;

  @Column({ name: 'last_time' })
  last_time: Date;

  @Column({ name: 'like_count' })
  like_count: number;

  @Column({ name: 'source' })
  source: LikeVideoSourceEnum;

  @Column({ name: 'share_wx_user' })
  share_wx_user: string;

  @Column({ name: 'delete_tag' })
  delete_tag: number;

  @ManyToOne(() => Video, (autherinfo) => autherinfo.likes)
  video_: Video[];
}
